package org.vestbjergbyggecenter.Test;

import static org.junit.Assert.*;

import org.junit.Test;
import org.vestbjergbyggecenter.Model.Employee;
import org.vestbjergbyggecenter.Model.Manager;
import org.vestbjergbyggecenter.Model.SalesAssistant;

public class TestEmployee {

	@Test
	public void setId() {
		Employee employee = new Employee(3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setId(3);
		assertEquals(3, employee.getId());
	}
	
	public void getId() {
		Employee employee = new Employee(3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setId(3);
		assertEquals(3, employee.getId());
	}
	
	@Test
	public void setUserName() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setUsername("empUserName");
		assertEquals("empUserName", employee.getUsername());
	}
	
	public void getUserName() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setUsername("empUserName");
		assertEquals("empUserName", employee.getUsername());
	}
	
	@Test
	public void setCPR() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setCPR(310126);
		assertEquals(310126, employee.getCPR());
	}
	
	public void getCPR() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setCPR(310126);
		assertEquals(310126, employee.getCPR());
	}
		
	@Test
	public void setPassword() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setPassword("password");
		assertEquals("password", employee.getPassword());
	}
	
	public void getPassword() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setPassword("password");
		assertEquals("password", employee.getPassword());
	}
	
	@Test
	public void setSalary() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setSalary(25);
		assertEquals(25, employee.getSalary());
	}
	
	public void getSalary() {
		Employee employee = new Employee (3, "EmpName", 310126, "Boulevarden 13", 9000, "Aalborg", "956456532", "empUserName", "password", 198);
		employee.setSalary(25);
		assertEquals(25, employee.getSalary());
	}
	
	@Test
	public void isManager() {
		Manager manager = new Manager (21, "managerName", 652458, "Sofiendalsvej 15", 9210, "Aalborg", "94569812", "manUserName", "manPass", 456, "Department");
		assertEquals(true, manager.isManager());
	}
	
	@Test
	public void isSalesAssistant() {
		SalesAssistant salesAssistant = new SalesAssistant (54, "salesName", 658426, "Sales address", 9000, "Aalborg", "65485423", "salesUserName", "salPass", 985);
		assertEquals(true, salesAssistant.isSalesAssistant());
	}

}
